package com.zy.garbage.util;

import java.util.Date;
import java.util.Random;

public class KeyUtil {
    public static synchronized String createUniqueKey(){
        Random random = new Random();
        Integer key = random.nextInt(900000000)+100000000;
        String time = MyDateUtil.date2SimpleString(new Date());
        return time + String.valueOf(key);
    }

    public static void main(String[] args) {
        System.out.println(createUniqueKey());
    }
}
